class A:
    pass


class B(A):
    pass


b = B()

# 实例
print(isinstance(b, B))
print(isinstance(b, A))
# 类型
print(type(b) is A)
